﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp4
{
    class Employee
    {
        public string Num { get; set; }  //工号

        private string name; //姓名
        public string Name { get { return name; } set { name = value; } }

        private string sex;  //性别
        public string Sex
        {
            get { return sex; }
            set
            {
                if (value.Equals("男") || value.Equals("女"))
                    sex = value;
                else
                    sex = "输入错误";

            }
        }

        public void Remak()
        {
            Console.WriteLine("大家好啊，我的工号是{0},姓名{1},性别{2}", Num, Name, Sex);
        }
    }
}
